import bpmUserGroupApi from "@/api/declaration/bpm/bpmUserGroupApi"
import httpRequest from "@/config/axios/httpRequest"
import { BpmUserGroupModel } from "@/models/bpm/BpmUserGroupModel"

// 创建用户组
export const createUserGroup = async (data: BpmUserGroupModel) => {
  return await httpRequest.post(bpmUserGroupApi.GreateUserGroup, { data })
}

// 更新用户组
export const updateUserGroup = async (data: BpmUserGroupModel) => {
  return await httpRequest.put(bpmUserGroupApi.UpdateUserGroup, { data })
}

// 删除用户组
export const deleteUserGroup = async (id: number) => {
  return await httpRequest.delete(bpmUserGroupApi.DeleteUserGroup, { params: { id } })
}

// 获得用户组
export const getUserGroup = async (id: number) => {
  return await httpRequest.get(bpmUserGroupApi.GetUserGroup, { params: { id } })
}

// 获得用户组分页
export const getUserGroupPage = async (params) => {
  return await httpRequest.get(bpmUserGroupApi.GetUserGroupPage, { params })
}

// 获取用户组精简信息列表
export const getUserGroupSimpleList = async () => {
  return await httpRequest.get(bpmUserGroupApi.GetUserGroupSimpleList)
}
